package com.czl.module_storehouse.mvp.presenter;

import com.czl.base.data.bean.tengyun.LocatListBean;
import com.czl.module_base.bean.ListBean;
import com.czl.module_base.http.HttpResponse;
import com.czl.module_base.mvp.presenter.BasePresenter;
import com.czl.module_base.observer.AbsHandleSubscriber;
import com.czl.module_storehouse.mvp.model.StorehouseLocationModel;
import com.czl.module_storehouse.mvp.view.StorehouseLocationView;

/**
 * @author by xubin,
 * @date on 2022/2/21.
 * PS: Not easy to write code, please indicate.
 */
public class StorehouseLocationPresenter extends BasePresenter<StorehouseLocationModel, StorehouseLocationView> {
    public static final String TAG_GET_LOCATION_LIST = "get_location_list";

    public void getStorehouseLocatList() {

        doSubscribe2(mModel.getStorehouseLocatList(), new AbsHandleSubscriber<HttpResponse<ListBean<LocatListBean>>>() {
            @Override
            public void onSuccess(HttpResponse<ListBean<LocatListBean>> listBeanHttpResponse) {
                listBeanHttpResponse.setRequestTag(TAG_GET_LOCATION_LIST);
                mView.showHttpResponse(listBeanHttpResponse);
            }
        });
    }

}
